graph piecewise with three equations